; Music of Megablasters Presentation (1994) (Odiesoft)
; Ripped by Megachur the 29/03/2008

	write "MEGABLAP.BIN"

music_date_rip	equ &1d38
music_adr	equ &1e00
first_theme	equ 0
last_theme	equ 0

	read "music_header_v1_0.asm"

; #2238
;db "ST-Module."

;#1e00
	jp l1e0b
	jp l1e93
	jp l1e77
	db #66,#04
;
.init_music
.l1e0b
;
	ld b,#03
	ld ix,l21da
	ld iy,l2106
	ld de,#001c
.l1e18
	push bc
	ld (ix+#06),#01
	ld (ix+#09),d
	ld (ix+#1b),d
	ld (ix+#05),#10
	ld l,(iy+#00)
	ld h,(iy+#01)
	ld a,(hl)
	ld (ix+#08),a
	inc hl
	ld c,(hl)
	inc hl
	ld b,(hl)
	inc hl
	ld (ix+#0c),l
	ld (ix+#0d),h
	ld (ix+#00),c
	ld (ix+#01),b
	add ix,de
	inc iy
	inc iy
	pop bc
	djnz l1e18
	ld a,#06
	ld (l1ebb),a
	ld a,d
	ld (l1ecf),a
	inc a
	ld (l1eb6),a
	ld a,#38
	ld (l1ec0),a
	ld a,#ff
	ld (l2102),a
	ld (l2103),a
	ld (l2104),a
	ld (l2105),a
	ld a,#0c
	ld c,d
	call l20e4
	ld a,#0d
	ld c,d
	jp l20e4
;
.stop_music
.l1e77
;
	ld a,#07
	ld c,#3f
	call l20e4
	ld a,#08
	ld c,#00
	call l20e4
	ld a,#09
	ld c,#00
	call l20e4
	ld a,#0a
	ld c,#00
	jp l20e4
;
.play_music
.l1e93
;
	ld hl,l1eb6
	dec (hl)
	ld ix,l21da
	ld bc,l21e8
	call l1f49
	ld ix,l21f6
	ld bc,l2204
	call l1f49
	ld ix,l2212
	ld bc,l2220
	call l1f49
.l1eb6 equ $ + 1
	ld a,#00
	or a
	jr nz,l1ebf
.l1ebb equ $ + 1
	ld a,#00
	ld (l1eb6),a
.l1ec0 equ $ + 1
.l1ebf
	ld a,#00
	ld hl,l2103
	cp (hl)
	jr z,l1ece
	ld (hl),a
	ld c,a
	ld a,#07
	call l20e4
.l1ecf equ $ + 1
.l1ece
	ld a,#00
	ld hl,l2102
	cp (hl)
	jr z,l1edd
	ld (hl),a
	ld c,a
	ld a,#06
	call l20e4
.l1ede equ $ + 1
.l1edd
	ld a,#00
	ld hl,l2104
	cp (hl)
	jr z,l1eec
	ld (hl),a
	ld c,a
	ld a,#0b
	call l20e4
.l1eed equ $ + 1
.l1eec
	ld a,#00
	ld hl,l2105
	cp (hl)
	ret z
	ld (hl),a
	ld c,a
	ld a,#0d
	jp l20e4
.l1efa
	inc hl
	ld b,(hl)
	ld (ix+#06),b
	inc hl
	ld (ix+#00),l
	ld (ix+#01),h
	jp l1ffa
.l1f09
	inc hl
	ld a,(hl)
	ld (ix+#06),a
	inc hl
	ld (ix+#00),l
	ld (ix+#01),h
	xor a
	ld (ix+#17),a
	ld (ix+#15),a
	ld c,a
	ld a,(ix+#04)
	jp l20e4
.l1f23
	ld (ix+#0a),#00
	ld l,(ix+#0c)
	ld h,(ix+#0d)
	ld a,(hl)
	cp #80
	jr nz,l1f38
	inc hl
	ld e,(hl)
	inc hl
	ld d,(hl)
	ex de,hl
	ld a,(hl)
.l1f38
	inc hl
	ld e,(hl)
	inc hl
	ld d,(hl)
	inc hl
	ld (ix+#0c),l
	ld (ix+#0d),h
	ld (ix+#08),a
	ex de,hl
	jr l1f5c
.l1f49
	ld a,(l1eb6)
	or a
	jp nz,l1ffa
	dec (ix+#06)
	jp nz,l1ffa
	ld l,(ix+#00)
	ld h,(ix+#01)
.l1f5c
	ld a,(hl)
	or a
	jr z,l1efa
	cp #fe
	jr z,l1f09
	cp #ff
	jr z,l1f23
	ld d,#00
	and #7f
	sub #0a
	add (ix+#08)
	ld (ix+#07),a
	add a
	ld e,a
	push hl
	ld hl,l210c
	add hl,de
	ld a,(hl)
	ld (ix+#18),a
	inc hl
	ld a,(hl)
	ld (ix+#19),a
	pop hl
	ld a,#01
	bit 7,(hl)
	jr nz,l1f98
	inc hl
	ld a,(hl)
	bit 7,a
	jr z,l1f98
	and #7f
	ld (ix+#06),a
	jr l1feb
.l1f98
	ld (ix+#06),a
	inc hl
	push hl
	ld a,(hl)
	push af
	and #0f
	cp (ix+#05)
	jr z,l1fac
	ld (ix+#05),a
	ld (ix+#0a),d
.l1fac
	add a
	add a
	add a
	ld e,a
	ld hl,l2242
	add hl,de
	ld d,b
	ld e,c
	ldi
	ldi
	ldi
	ldi
	ldi
	ldi
	ldi
	ldi
	pop af
	pop hl
	and #f0
	jr z,l1feb
	cp #f0
	jp z,l20a0
	cp #d0
	jp z,l20bc
	cp #b0
	jp z,l20c4
	cp #80
	jp nc,l20cc
	cp #10
	jr nz,l1feb
	xor a
	ld (ix+#1b),a
	ld (ix+#09),a
.l1feb
	inc hl
	ld (ix+#00),l
	ld (ix+#01),h
	ld (ix+#16),#00
	ld (ix+#17),#20
.l1ffa
	ld a,(ix+#17)
	or a
	jr nz,l200e
	ld a,(ix+#15)
	or a
	ret z
	ld (ix+#17),a
	ld a,(ix+#14)
	ld (ix+#16),a
.l200e
	ld d,#00
	ld e,(ix+#16)
	inc (ix+#16)
	dec (ix+#17)
	ld a,(ix+#1b)
	or a
	jr z,l2039
	ld h,a
	ld l,(ix+#1a)
	add hl,de
	ld a,(hl)
	ld b,(ix+#07)
	add b
	add a
	ld b,d
	ld c,a
	ld hl,l210c
	add hl,bc
	ld a,(hl)
	ld (ix+#18),a
	inc hl
	ld a,(hl)
	ld (ix+#19),a
.l2039
	ld h,(ix+#0f)
	ld l,(ix+#0e)
	add hl,de
	add hl,de
	ld c,(hl)
	inc hl
	ld b,(hl)
	ld l,(ix+#18)
	ld h,(ix+#19)
	add hl,bc
	ld c,l
	ld a,(ix+#02)
	call l20e4
	ld c,h
	ld a,(ix+#03)
	call l20e4
	ld h,(ix+#11)
	ld l,(ix+#10)
	add hl,de
	ld a,(hl)
	bit 7,a
	jr nz,l2077
	and #0f
	sub (ix+#0a)
	jr nc,l206d
	xor a
.l206d
	or (ix+#09)
	ld c,a
	ld a,(ix+#04)
	call l20e4
.l2077
	ld l,(ix+#12)
	ld h,(ix+#13)
	add hl,de
	ld a,(hl)
	bit 7,a
	ret nz
	and #1f
	ld b,(ix+#0b)
	ld c,a
	or a
	ld a,b
	jr z,l2094
	ld b,a
	ld a,c
	ld (l1ecf),a
	ld a,b
	sub #40
.l2094
	ld (l209b),a
	ld a,(l1ec0)
.l209b equ $ + 1
	bit 0,a
	ld (l1ec0),a
	ret
.l20a0
	inc hl
	ld a,(hl)
	push hl
	add a
	ld b,#00
	ld c,a
	ld hl,l22c2
	add hl,bc
	ld e,(hl)
	inc hl
	ld d,(hl)
	ld (ix+#1a),e
	ld (ix+#1b),d
	ld (ix+#09),#00
	pop hl
	jp l1feb
.l20bc
	inc hl
	ld a,(hl)
	ld (l1ebb),a
	jp l1feb
.l20c4
	inc hl
	ld a,(hl)
	ld (ix+#0a),a
	jp l1feb
.l20cc
	ld (ix+#09),#10
	ld (ix+#1b),#00
	ld a,(hl)
	rrca
	rrca
	rrca
	rrca
	ld (l1eed),a
	inc hl
	ld a,(hl)
	ld (l1ede),a
	jp l1feb
.l20e4
	ld b,#f4
	out (c),a
	ld b,#f6
	in a,(c)
	or #c0
	out (c),a
	and #3f
	out (c),a
	ld b,#f4
	out (c),c
	ld b,#f6
	ld c,a
	or #80
	out (c),a
	out (c),c
	ret
.l2105 equ $ + 3
.l2104 equ $ + 2
.l2103 equ $ + 1
.l2102
	db #ff,#ff,#ff,#ff
.l2106
	dw l2582,l258b,l2594
.l210c
	dw #0eee,#0e18,#0d4d,#0c8e
	dw #0bda,#0b2f,#0a8f,#09f7
	dw #0968,#08e1,#0861,#07e9
	dw #0777,#070c,#06a7,#0647
	dw #05ed,#0598,#0547,#04fc
	dw #04b4,#0470,#0431,#03f4
	dw #03bc,#0386,#0353,#0324
	dw #02f6,#02cc,#02a4,#027e
	dw #025a,#0238,#0218,#01fa
	dw #01de,#01c3,#01aa,#0192
	dw #017b,#0166,#0152,#013f
	dw #012d,#011c,#010c,#00fd
	dw #00ef,#00e1,#00d5,#00c9
	dw #00be,#00b3,#00a9,#009f
	dw #0096,#008e,#0086,#007f
	dw #0077,#0071,#006a,#0064
	dw #005f,#0059,#0054,#0050
	dw #004b,#0047,#0043,#003f
	dw #003c,#0038,#0035,#0032
	dw #002f,#002d,#002a,#0028
	dw #0026,#0024,#0022,#0020
	dw #001e,#001c,#001b,#0019
	dw #0018,#0016,#0015,#0014
	dw #0013,#0012,#0011,#0010
	dw #000f
	db #00,#00,#00,#00,#00,#00,#00,#00
.l21da equ $ + 4
	db #00,#00,#00,#00,#00,#00,#00,#01
	db #08,#00,#00,#00,#00,#00,#00,#df
.l21e8 equ $ + 2
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l21f6
	db #00,#00,#02,#03,#09,#00,#00,#00
.l2204 equ $ + 6
	db #00,#00,#00,#e7,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l2212 equ $ + 4
	db #00,#00,#00,#00,#00,#00,#04,#05
	db #0a,#00,#00,#00,#00,#00,#00,#ef
.l2220 equ $ + 2
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00
	db #53,#54,#2d,#4d,#6f,#64,#75,#6c
	db #65,#2e
.l2242
	dw l22e2,l2322,l2342,#0000
	dw #1cdc,#1cdc,#1cdc,#0000
	dw #1cdc,#1cdc,#1cdc,#0000
	dw #1cdc,#1cdc,#1cdc,#0000
	dw l2362,l23a2,l23c2,#0000
	dw l23e2,l2422,l2442
	dw #0c14,#1cdc,#1cdc,#1cdc
	dw #0000,#1cdc,#1cdc,#1cdc
	dw #0000,#1cdc,#1cdc,#1cdc
	dw #0000
	dw l2462,l24a2,l2442,#0000
	dw #1cdc,#1cdc,#1cdc,#0000
	dw #1cdc,#1cdc,#1cdc,#0000
	dw #1cdc,#1cdc,#1cdc,#0000
	dw #1cdc,#1cdc,#1cdc,#0000
	dw #1cdc,#1cdc,#1cdc,#0000
	dw l24c2,l2502,l2522,#0000
.l22c2
	dw l2542,l2562
	db #dc,#1c,#dc,#1c,#dc,#1c,#dc,#1c
	db #dc,#1c,#dc,#1c,#dc,#1c,#dc,#1c
	db #dc,#1c,#dc,#1c,#dc,#1c,#dc,#1c
.l22e2 equ $ + 4
	db #dc,#1c,#dc,#1c,#80,#00,#00,#01
	db #80,#01,#00,#02,#80,#02,#00,#03
	db #00,#04,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l2322 equ $ + 4
	db #00,#00,#00,#00,#0f,#0f,#0e,#0e
	db #0d,#0a,#00,#80,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l2342 equ $ + 4
	db #00,#00,#00,#00,#07,#00,#80,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l2362 equ $ + 4
	db #00,#00,#00,#00,#00,#00,#ff,#ff
	db #fe,#ff,#ff,#ff,#00,#00,#01,#00
	db #02,#00,#01,#00,#00,#00,#ff,#ff
	db #fe,#ff,#ff,#ff,#00,#00,#01,#00
	db #02,#00,#01,#00,#00,#00,#ff,#ff
	db #fe,#ff,#ff,#ff,#00,#00,#01,#00
	db #02,#00,#01,#00,#00,#00,#ff,#ff
	db #fe,#ff,#ff,#ff,#00,#00,#01,#00
.l23a2 equ $ + 4
	db #02,#00,#00,#00,#05,#05,#06,#06
	db #07,#07,#07,#08,#08,#07,#08,#08
	db #09,#08,#08,#08,#08,#08,#08,#08
	db #08,#08,#08,#08,#08,#08,#08,#08
.l23c2 equ $ + 4
	db #08,#08,#08,#08,#00,#80,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l23e2 equ $ + 4
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#01,#00,#01,#00
	db #01,#00,#00,#00,#00,#00,#00,#00
	db #fe,#ff,#fe,#ff,#fe,#ff,#00,#00
	db #00,#00,#00,#00,#02,#00,#03,#00
	db #02,#00,#00,#00,#00,#00,#00,#00
	db #ff,#ff,#fe,#ff,#fe,#ff,#ff,#ff
.l2422 equ $ + 4
	db #00,#00,#00,#00,#0f,#0f,#0e,#0e
	db #0e,#0d,#0d,#0d,#0c,#0c,#0c,#0b
	db #0b,#0c,#0c,#0c,#0c,#0b,#0b,#0b
	db #0c,#0c,#0b,#0b,#0b,#0a,#0a,#0a
.l2442 equ $ + 4
	db #0a,#0a,#0a,#0a,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l2462 equ $ + 4
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l24a2 equ $ + 4
	db #00,#00,#00,#00,#08,#08,#08,#09
	db #09,#09,#09,#09,#0a,#0a,#0a,#0a
	db #0b,#0b,#0b,#0b,#0c,#0c,#0d,#0d
	db #0d,#0d,#0d,#0d,#0d,#0d,#0d,#0d
.l24c2 equ $ + 4
	db #0d,#0d,#0d,#0d,#00,#80,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l2502 equ $ + 4
	db #00,#00,#00,#00,#0f,#0f,#0e,#0e
	db #0e,#0d,#0d,#0d,#0d,#0c,#0c,#0c
	db #0c,#0b,#0b,#0b,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l2522 equ $ + 4
	db #00,#00,#00,#00,#19,#19,#19,#1a
	db #1a,#1a,#1b,#1b,#1b,#1c,#1c,#1c
	db #1d,#1d,#1d,#1d,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l2542 equ $ + 4
	db #00,#00,#00,#00,#00,#03,#07,#00
	db #03,#07,#00,#03,#07,#00,#03,#07
	db #00,#03,#07,#00,#03,#07,#00,#03
	db #07,#00,#03,#07,#00,#03,#07,#00
.l2562 equ $ + 4
	db #03,#07,#00,#03,#00,#04,#07,#00
	db #04,#07,#00,#04,#07,#00,#04,#07
	db #00,#04,#07,#00,#04,#07,#00,#04
	db #07,#00,#04,#07,#00,#04,#07,#00
.l2582 equ $ + 4
	db #04,#07,#00,#04,#00,#9d,#25,#00
.l258b equ $ + 5
	db #ae,#25,#80,#82,#25,#00,#c1,#25
.l2594 equ $ + 6
	db #00,#d4,#25,#80,#8b,#25,#00,#06
	db #26,#00,#87,#26,#80,#94,#25,#3a
	db #10,#19,#41,#10,#09,#46,#96,#46
	db #02,#f5,#01,#46,#08,#f5,#00,#ff
	db #00,#19,#3a,#02,#bf,#00,#3a,#02
	db #bf,#03,#3a,#02,#bf,#05,#3a,#21
	db #bf,#07,#ff,#00,#38,#2e,#02,#b0
	db #07,#2e,#02,#b0,#06,#2e,#02,#b0
	db #05,#2e,#02,#b0,#04,#ff,#2e,#02
	db #b0,#03,#2e,#02,#b0,#02,#2e,#02
	db #b0,#01,#2e,#02,#b0,#00,#2e,#82
	db #2e,#02,#00,#2e,#82,#2e,#82,#2e
	db #82,#2e,#82,#2e,#82,#2e,#82,#2e
	db #02,#bf,#00,#2e,#02,#bf,#03,#2e
	db #02,#bf,#05,#2e,#22,#bf,#07,#ff
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ba,#04,#c1,#04,#c6,#04,#c1,#04
	db #ff,#ba,#b4,#00,#c1,#04,#c6,#04
	db #c1,#04,#ba,#04,#c1,#04,#c6,#04
	db #c1,#04,#ba,#04,#c1,#04,#c6,#04
	db #c1,#04,#ba,#04,#c1,#04,#c6,#04
	db #c1,#04,#ba,#04,#c1,#04,#c6,#04
	db #c1,#04,#ba,#04,#c1,#04,#c6,#04
	db #c1,#04,#ba,#04,#c1,#04,#c6,#04
	db #c1,#04,#ba,#04,#c1,#04,#c6,#04
	db #c1,#04,#ba,#b4,#04,#c1,#04,#c6
	db #04,#c1,#04,#ba,#b4,#05,#c1,#04
	db #c6,#04,#c1,#04,#ba,#b4,#06,#c1
	db #04,#c6,#04,#c1,#04,#ba,#b4,#07
	db #c1,#04,#c6,#04,#c1,#04,#fe,#10
;
.game_name
	db "Megablasters Presentation",0
.game_year
	db "1994",0
.game_publisher
	db "Odiesoft",0
.music_author
	db "",0
.music_comment
	db "ST-Module.",0

	read "music_end_v1_0.asm"
